package webjoch;

import java.awt.Graphics;

import webjoch.methods.Rooms;
import webjoch.misc.Constants;
import webjoch.misc.Functions;

import com.rsbuddy.event.listeners.PaintListener;
import com.rsbuddy.script.ActiveScript;
import com.rsbuddy.script.Manifest;
import com.rsbuddy.script.methods.Npcs;

@Manifest(name = "Debugger voor dungeoneering", description = "", authors = "Webjoch", version = 1.0)
public class Debug extends ActiveScript implements PaintListener{

	Dungeon dungeon;
	
	public boolean onStart(){
		dungeon = new Dungeon();
		dungeon.setBaseLocation(Npcs.getNearest(Constants.SMUGLER).getLocation());
		Main.setDungeon(dungeon);
		return true;
	}
	
	@Override
	public int loop(){
		
		return 0;
	}

	@Override
	public void onRepaint(Graphics g) {
		g.drawString("Room location: ("+ Rooms.getLocalRoom().getLocalLocation(true)[0] + ", "+ Rooms.getLocalRoom().getLocalLocation(true)[1]+") to tile: "+ Functions.roomLocationToTile(Rooms.getLocalRoom(), Rooms.getLocalRoom().getLocalLocation(true)), 11, 160);
        g.drawString("Room rotation: "+ Rooms.getLocalRoom().getRotation(), 11, 175);
        g.drawString("Saved rotation: "+ Main.getDungeon().roomRotations.size(), 11, 190);
	}

}
